<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>JSP - Hello World</title>
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
            text-decoration: none;
            list-style: none;
        }

        body {
            background-image: url("./img/bg2.webp");
            background-size: cover;
            background-attachment: fixed;
            background-position: center;
        }

        .loginBox {
            margin: 100px 45%;
            width: 300px;
            height: 320px;
            padding-left: 57px;
            padding-top: 30px;
            background: white;
            position: relative;
        }

        table {
            width: 350px;
            height: 200px;
        }

        .leftTD {
            height: 50px;
            width: 46px;
            color: #71c6f6;
        }

        .rightTD {
            height: 50px;
            width: 250px;
        }

        button {
            border: none;
            display: inline-block;
            width: 40px;
            height: 25px;
            background: #007eff;
            border-radius: 3px;
        }

        .other {
            width: 60px;
            height: 25px;
        }

        button a {
            color: white;
            font-size: 12px;
        }

        .login {
            font-size: 12px;
            color: #007eff;
            width: 40px;
            height: 24px;
            margin-right: 20px;
            border-radius: 3px;
            border: none;
            cursor: pointer;
        }

        .left {
            width: 316px;
            height: 350px;

            position: absolute;
            top: 0;
            left: -316px;
            background: #ffffff52;
        }

        .rightInput {
            border: none;
            border-bottom: 1px solid #71c6f6;
            outline: none;
        }

        .colspan {
            position: absolute;
            top: 215px;
        }
        .left p {
            height: 100px;
            text-align: center;
            line-height: 100px;
            color: #03a9f473;
            font-size: 32px;
            font-weight: bold;
        }

        .left span {
            text-align: center;
            letter-spacing: 31px;
            padding-left: 58px;
            font-weight: bold;
            font-size: 26px;
            color: #03a9f4d9;
        }

        .ptitle {
            font-size: 12px;
            padding: 20px;
        }
        .error_Msg{
            color: red;
            font-size: 14px;
        }
    </style>
</head>
<body>
<div class="loginBox">
    <div class="left">
        <p>Welcome</p>
        <span>欢迎登录</span>
    </div>
    <span class="error_Msg">
        ${requestScope.msg}
    </span>
    <form action="loginAndResgist" method="post">
        <input type="hidden" name="action" value="login">
        <table>
            <tr>
                <td colspan="2">
                </td>
            </tr>
            <tr>
                <td class="leftTD">
                    帐号：
                </td>
                <td class="rightTD">
                    <input class="rightInput" type="text" name="name" value="${requestScope.username}"/>
                </td>
            </tr>
            <tr>
                <td class="leftTD">
                    密码：
                </td>
                <td class="rightTD">
                    <input class="rightInput" type="password" name="password"/>
                </td>
            </tr>
            <tr>

                <td colspan="2" class="colspan">
                    <p class="ptitle">
                        学生、教师:<input type="radio" name="people" checked="checked" value="student">
                        管理员:<input type="radio" name="people" value="manger" >
                    </p>
<%--                 普通用户：<input type="radio" name="people" style ="background-color: #FF0000" >--%>
<%--                 管理员：<input type="radio" name="people" style ="background-color: #FF0000" ><br>--%>
                    <div class="lbtn">
                        <input class="login" type="submit" value="登入">
                        <button><a href="Regist.jsp">注册</a></button>
                        <button><a href="studentServlet?action=loginout">注销</a></button>
                        <button class="other"><a href="manager.jsp">后台管理</a></button>
                    </div>
                </td>
            </tr>
            <div>
                <td colspan="2" style="color: red;font-weight: bolder;text-align: center;"></td>
            </div>
        </table>
    </form>
</div>
</body>
</html>